package com.voute.Api;

import com.voute.Model.Bean.BaseBean;
import com.voute.Model.Bean.FeedDetailBean;
import com.voute.Model.Bean.VoteResultBean;

import java.util.HashMap;

import retrofit2.http.DELETE;
import retrofit2.http.FieldMap;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Path;
import rx.Observable;

/**
 * Feed详情service
 * Created by liucxu on 2017/1/23.
 */

public interface FeedDetailService {
    @GET("v1/feeds/{fid}")
    Observable<FeedDetailBean> getFeedDetails(@Path("fid") String fid);
    @FormUrlEncoded
    @POST("v1/users/self/collect/{fid}")
    Observable<BaseBean> starFeeds(@Path("fid") String fid,@FieldMap HashMap<String,String> values);
    @FormUrlEncoded
    @POST("v1/feeds/{fid}/vote")
    Observable<VoteResultBean> voteFeed(@Path("fid") String fid,@FieldMap HashMap<String,String> values);
    @DELETE("v1/users/self/collect/{fid}")
    Observable<BaseBean> unstarFeeds(@Path("fid") String fid);
    @FormUrlEncoded
    @POST("v1/comments/{cid}/vote")
    Observable<BaseBean> upComment(@Path("cid") String cid,@FieldMap HashMap<String,String> values);
    @FormUrlEncoded
    @POST("v1/feeds/{fid}/report")
    Observable<BaseBean> reportFeed(@Path("fid") String fid, @FieldMap HashMap<String,String> params);
}
